var xmlHttp; 

function createXMLRequest(){
	if(window.ActiveXObject){
		xmlHttp=new ActiveXObject("Microsoft.XMLHttp");
	} else if(window.XMLHttpRequest){
		xmlHttp=new XMLHttpRequest();
	}
}
//添加反馈
function feedback(){   
	createXMLRequest();                       
	var content=document.getElementById("content").value;
	xmlHttp.open("POST","/users/addFeedback/");
	xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	//document.getElementById("news_pic").style.display=None;
	xmlHttp.onreadystatechange=handleStateChange;
	xmlHttp.send('content='+content) ; 
}

function handleStateChange(e){
	if(xmlHttp.readyState==4 && xmlHttp.status==200){
		if(xmlHttp.responseText==1){
			document.getElementById('content').value="";
			e.preventDefault();
    		$.scojs_message('您的反馈成功发布成功！', $.scojs_message.TYPE_OK);
		} else if(xmlHttp.responseText==0) {
			e.preventDefault();
    		$.scojs_message('服务器出错啦～ ：）', $.scojs_message.TYPE_ERROR);
		}
	} else {
		e.preventDefault();
    	$.scojs_message('服务器有小怪兽在捣乱～我们正在尽力捕捉～ ：）', $.scojs_message.TYPE_ERROR);
	}
}